package com.lzk.product.service.impl;

import com.lzk.JsonResult;
import com.lzk.domain.Product;
import com.lzk.product.mapper.ProductMapper;
import com.lzk.product.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProductServiceImpl implements IProductService {
    @Autowired
    private ProductMapper productMapper;
    @Override
    public JsonResult save(Product product) {
        try {
            productMapper.save(product);
            return new JsonResult(true,"操作成功");
        } catch (Exception e) {
            e.printStackTrace();
            return new JsonResult(false,"操作失败");
        }

    }
}
